<include file="application/walletyhbbadmin/view/public/left.html"/>
<div id="dcMain">
    <!-- 当前位置 -->
    <div id="urHere">管理中心<b>></b><strong>关于我们</strong> </div>
    <div class="mainBox" style="height:auto!important;height:550px;min-height:550px;">

        <div class="tools">
            <ul class="toolbar" style="border: 1px solid #ccc; width: 80px; float: right;">
                <a href="addhonor"><li class="click"><span><img src="/Public/admin/images/t01.png"></span>添加</li></a>
            </ul>
        </div><br/>
        <div id="list">

            <table width="100%" border="0" cellpadding="8" cellspacing="0" class="tableBasic">
                <tr style="text-align:center;">
                    <th>编号</th>
                    <th>荣誉名称</th>
                    <th>是否在前台显示</th>
                    <th>操作</th>

                </tr>
                <foreach name="res" item="vc">
                    <tr align="center">
                        <td>{$vc.id}</td>
                        <td>{$vc.r_name}</td>
                        <td>
                            <eq name="vc.r_show" value="1">使用
                                <span style="background-color:#0066ff;border-radius:8px">&nbsp;<a href="{:U('coupon/updateStatus',array('id'=>$vc.id,'status'=>'0'))}" style="color:#fff">关闭</a>&nbsp;</span>
                            </eq>
                            <eq name="vc.r_show" value="0">关闭
                                <span style="background-color:#0066ff;border-radius:8px">&nbsp;<a href="{:U('coupon/updateStatus',array('id'=>$vc.id,'status'=>'1'))}" style="color:#fff">使用</a>&nbsp;</span>
                            </eq></td>
                        <td>
                            <a href="editHonor/id/{$vc.id}" class="tablelink1">修改</a>
                            <a href="delHonor/id/{$vc.id}" class="tablelink2 del">删除</a>
                        </td>
                    </tr>
                </foreach>
            </table>

        </div>
        <div class="clear"></div>
        <div class="pager">
            <div>{$page}</div>
        </div>
    </div>
</div>
<div class="clear"></div>
<include file="application/walletyhbbadmin/view/public/foot.html"/><!-- dcFooter 结束 -->
<div class="clear"></div> </div>
<script type="text/javascript">

    onload = function()
    {
        document.forms['action'].reset();
    }

    function douAction()
    {
        var frm = document.forms['action'];
        frm.elements['new_cat_id'].style.display = frm.elements['action'].value == 'category_move' ? '' : 'none';
    }




    //实名认证
    function authentication(id){
        layer.open({
            type: 2,
            title: '实名认证',
            maxmin: true,
            shadeClose: true,
            area : ['800px' , '850px'],
            content: '{:U("Member/authentication")}?member_id='+id
        });
    }





    //添加地址
    function addaddress(id){
        layer.open({
            type: 2,
            title: '添加地址',
            maxmin: true,
            shadeClose: true,
            area : ['800px' , '850px'],
            content: '{:U("Member/addaddress")}?member_id='+id
        });
    }




    function shanchu(id) {
        var url = "{:U('Member/delete')}";
        var msg = "您确定要删除吗？";
        if (confirm(msg)==true){
            $.post(url, {'member_id': id}, function (data) {
                layer.msg(data.info);
                if (data.status == 1) {
                    setTimeout(function () {
                        window.location.reload();
                    }, 2000);
                }
            });
        }
    }

    //注册审核通过
    function audit_y(id) {
        var url = "{:U('Member/audit_y')}";
        $.post(url, {id: id}, function (data) {
            layer.msg(data.info);
            if (data.status == 1) {
                setTimeout(function () {
                    window.location.reload();
                }, 2000);
            }
        })
    }
    function shanchu(id){
        var url="{:U('Member/delete')}";
        var msg = "您确定要删除吗？";
        if (confirm(msg)==true) {
            $.post(url, {'member_id': id}, function (data) {
                layer.msg(data.info);
                if (data.status == 1) {
                    setTimeout(function () {
                        window.location.reload();
                    }, 2000);
                }
            });
        }
    }

    //查看代理申请信息
    function getDistributInfo(user_id){
        layer.open({
            type: 2,
            title: '代理申请信息',
            maxmin: true,
            shadeClose: true,
            area : ['800px' , '850px'],
            content: '{:U("Member/getDistributInfo")}?user_id='+user_id
        });
    }


</script>
</body>
</html>
